<template>
	<view class="page-view">
		<nav-view :defaultShow="true" :title="'进行中的咨询'"></nav-view>
		<view class="page-conte">
			<view class="list-view-box">
				<view class="item-box" v-for="(item,index) in list" :key="index" @click="gotoMessage(item)">
					<view class="title u-line-1">{{item.title}}</view>
					<view class="bottom-box is-flex">
						<text class="time">{{item.time}}</text>
						<img class="delet" src="@/static/images/icon-delete.png" alt="">
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return {
				list:[
					// {text:'[图片]',time:'19:32'},
					// {text:'在做这件事的时候，有没有遇到什...',time:'19:32'},
					// {text:'你能再多说一点吗，你是哪里困惑...',time:'19:32'},
				]
			}
		},
		onShow() {
			this.getData();
		},
		methods:{
			getData() {
				let self = this;
				self.isloadding = true;
				self._get('consult.consult/getCurrentConsultList', {}, function(res) {
					
					
					self.list = res.data.list;
					
					self.loadding = false;
					uni.stopPullDownRefresh();
					self.isloadding = false;
				});
			},
			gotoMessage(item){
				uni.navigateTo({
					url:'/pages/onlineMessage/index?consultId='+item.consult_id
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page-conte {
		padding: 40rpx;
	}
	.item-box {
		background: #FFFFFF;
		box-shadow: 0rpx 5rpx 20rpx 1rpx rgba(0,26,112,0.08);
		border-radius: 13rpx;
		border: 1rpx solid #D1D1D1;
		padding: 40rpx;
		margin-bottom: 40rpx;
	}
	.item-box .title {
		font-size: 37rpx;
		font-family: Source Han Sans CN-Medium, Source Han Sans CN;
		font-weight: 500;
		color: #333333;
	}
	.bottom-box {
		margin-top: 20rpx;
	}
	.bottom-box .time {
		font-size: 24rpx;
		font-family: Source Han Sans CN-Regular, Source Han Sans CN;
		color: #999999;
	}
	.bottom-box .delet {
		width: 30rpx;
		height: 30rpx;
	}
</style>